package SC12Project.pm2.publish;

import java.rmi.RemoteException;

import org.apache.juddi.v3.client.transport.TransportException;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.uddi.v3_service.DispositionReportFaultMessage;

public class DeleteService
{
    static Logger logger = Logger.getLogger( DeleteService.class );

    /**
     * @param args
     */
    public static void main( String[] args )
    {
        BasicConfigurator.configure();
        JuddiClient juddiClient = new JuddiClient();
        juddiClient.initilize();
        try
        {
            juddiClient.serverLogin( "root", "root" );
            juddiClient.deleteBusiness( "test2" );
            juddiClient.deleteBusiness( "test1" );
        }
        catch ( DispositionReportFaultMessage e )
        {
            e.printStackTrace();
        }
        catch ( RemoteException e )
        {
            e.printStackTrace();
        }
        catch ( TransportException e1 )
        {
            e1.printStackTrace();
        }
    }

}
